adjusted_r_squared Function

public pure function adjusted_r_squared(p, x, xm) result(rst)

Computes the adjusted R-squared value for a data set.

The adjusted R-squared provides a mechanism for tempering the effects of extra explanatory variables on the traditional R-squared calculation. It is computed by noting the sample size and the number of variables . .

See Also:

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: p

The number of variables.

real(kind=real64), intent(in) :: x(:)

An N-element array containing the dependent variables from the data set.

real(kind=real64), intent(in) :: xm(:)

An N-element array containing the corresponding modeled values.

Return Value real(kind=real64)

The result.